#!/bin/sh
${CVI_SHOPTS}
#
# Start firmware
#
export USERDATAPATH=/mnt/data/
export SYSTEMPATH=/mnt/system/

case "$1" in
  start)
        echo "init mpp system..."
        if [ -d $SYSTEMPATH/ko ]; then
                sh $SYSTEMPATH/ko/loadsystemko.sh
        fi

        echo "Starting app..."
        if [ -f $USERDATAPATH/auto.sh ]; then
                usleep 30000
                . $USERDATAPATH/auto.sh &
		exit 1
        fi
	if [ -f $SYSTEMPATH/auto.sh ]; then
                usleep 30000
                . $SYSTEMPATH/auto.sh &
        fi
        ;;
  stop)
        ;;
  restart|reload)
        ;;
  *)
        echo "Usage: $0 {start|stop|restart}"
        exit 1
esac

exit $?

